package com.turing.post.common.util;

import java.math.BigInteger;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

/**
 * @系统登录用户业务
 * @author 张小盼
 */
@Remote
@Local
public interface SysOpUserBusiness {

	/**
	 * 用户登录
	 * 
	 * @param webInput
	 *            日志记录对象
	 * @param sysOpUser
	 *            用户对象
	 * @return 用户信息
	 * @throws PCPSApplicationException
	 */
	public SysOpUser sysOpUserLogon(PCPSWebInput webInput, SysOpUser sysOpUser)
			throws PCPSApplicationException;

	/**
	 * 登录成功获取菜单目录
	 * 
	 * @param eo
	 * @return
	 */
	public List<SysOpMenuGroup> getLogonSysOpMenuGroup(SysOpUser eo);

	/**
	 * 新增用户
	 * 
	 * @param webInput
	 *            日志记录对象
	 * @param sysOpUser
	 *            用户对象
	 * @throws PCPSApplicationException
	 */
	public void insertSysOpUser(PCPSWebInput webInput, SysOpUser sysOpUser)
			throws PCPSApplicationException;

	/**
	 * 修改用户 普通修改不修改用户状态，状态不赋值，锁定用户只给用户状态赋值，其他不赋值
	 * 
	 * @param webInput
	 *            日志记录对象
	 * @param sysOpUser
	 *            用户对象
	 * @throws PCPSApplicationException
	 */
	public void updateSysOpUser(PCPSWebInput webInput, SysOpUser sysOpUser,
			BigInteger roleId) throws PCPSApplicationException;

	/**
	 * 修改密码
	 * 
	 * @param webInput
	 *            日志记录对象
	 * @param oldPassword
	 *            旧密码
	 * @param sysOpUser
	 *            用户对象
	 * @throws PCPSApplicationException
	 */
	public void updateSysOpUserPassword(PCPSWebInput webInput,
			String oldPassword, SysOpUser sysOpUser)
			throws PCPSApplicationException;

	/**
	 * 登录界面找回密码
	 * 
	 * @param webInput
	 * @param sysOpUser
	 * @throws PCPSApplicationException
	 */
	public void getLossPasswordBySysOpUser(PCPSWebInput webInput,
			SysOpUser sysOpUser) throws PCPSApplicationException;

	/**
	 * 重置密码
	 * 
	 * @param webInput
	 * @param sysOpUser
	 * @throws PCPSApplicationException
	 */
	public String resetSysOpUserPassword(PCPSWebInput webInput,
			SysOpUser sysOpUser) throws PCPSApplicationException;

	/**
	 * 修改安全问题
	 * 
	 * @param webInput
	 * @param sysOpUser
	 * @throws PCPSApplicationException
	 */
	public void updateSysOpUserQuestion(PCPSWebInput webInput,
			SysOpUser sysOpUser) throws PCPSApplicationException;

	/**
	 * 用户登录后待办事项
	 * 
	 * @param webInput
	 * @return
	 * @throws PCPSApplicationException
	 */
	public List<SysOpSap> getAgencyList(PCPSWebInput webInput);

	public LogonResult insertSysOperLog(PCPSWebInput webInput,
			SysOpUser sysOpUser) throws PCPSApplicationException;
	
	/**
	 * 删除用户
	 * @param operId
	 * @throws PCPSApplicationException
	 */
	public void deleteSysOpUser(BigInteger operId) throws PCPSApplicationException;

}
